package one.stand.controller;

import com.jmp.autocofiguration.web.interceptor.SecurityAuthCheck;
import io.swagger.annotations.Api;
import one.stand.model.CompanyCategoryModel;
import one.stand.model.ResultModel;
import one.stand.request.CompanyCategoryModelRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yandou on 2019/6/13.
 */

@RestController
@RequestMapping("adminApi/company/category")
@Api(description = "企业类目管理")
public class CompanyCategoryController extends BaseController {

    @PostMapping("list")
    @SecurityAuthCheck
    public ResultModel list(@RequestBody CompanyCategoryModelRequest request) {
        return adminFegin.companyCategoryList(request);
    }

    @PostMapping("add")
    @SecurityAuthCheck
    public ResultModel add(@RequestBody CompanyCategoryModel model) {
        return adminFegin.companyCategoryAdd(model);
    }

    @PostMapping("delete")
    @SecurityAuthCheck
    public ResultModel delete(@RequestBody CompanyCategoryModel model) {
        return adminFegin.companyCategoryDelete(model);
    }
}
